#pragma once
#include "EventLoop.h"
#include "WorkerThread.h"
#include <stdbool.h>
#include <vector>
#include <assert.h>
#include <stdlib.h>
using namespace std;


class ThreadPool
{
public:
    ThreadPool(EventLoop* mainLoop, int count);
    ~ThreadPool();
    void run();
    EventLoop* takeWorkerEventLoop();

private:
    EventLoop* m_mainLoop;
    int m_threadNum;
    vector<WorkerThread*> m_workerThreads;
    int m_index;
};

